package com.glsc.ngateway.common.base.domain.sqlserver.glsec;

import javax.persistence.*;
import java.util.Objects;

/**
 * @Auther: gaojc
 * @Date: 2021/9/22 18:24
 * @Description:
 */
@Entity
@Table(name = "eVW_EmpInfo")
public class TAmEhrEmpEntity {
    private String badge;
    private String name;
    private String email;
    private Integer depid;
    private String title;
    private String jobTitle;
    private Integer jobId;
    private String mobile;
    private TAmEhrDeptinfoEntity parentDepartment;

    private String reportto;

    @Basic
    @Column(name = "reportto", nullable = true, length = 100)
    public String getReportto() {
        return reportto;
    }

    public void setReportto(String reportto) {
        this.reportto = reportto;
    }

    @Id
    @Column(name = "badge", nullable = false, length = 100)
    public String getBadge() {
        return badge;
    }

    public void setBadge(String badge) {
        this.badge = badge;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 200)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "email", nullable = true, length = 500)
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "depid", nullable = true)
    public Integer getDepid() {
        return depid;
    }

    public void setDepid(Integer depid) {
        this.depid = depid;
    }

    @Basic
    @Column(name = "title", nullable = true, length = 100)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "jtitle", nullable = true, length = 100)
    public String getJobTitle() {
        return jobTitle;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    @Basic
    @Column(name = "jobid", nullable = true)
    public Integer getJobId() {
        return jobId;
    }

    public void setJobId(Integer jobId) {
        this.jobId = jobId;
    }

    @Basic
    @Column(name = "mobile", nullable = true, length = 30)
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Transient
    public TAmEhrDeptinfoEntity getParentDepartment() {
        return parentDepartment;
    }

    public void setParentDepartment(TAmEhrDeptinfoEntity parentDepartment) {
        this.parentDepartment = parentDepartment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TAmEhrEmpEntity that = (TAmEhrEmpEntity) o;
        return Objects.equals(badge, that.badge) && Objects.equals(name, that.name) && Objects.equals(email, that.email) && Objects.equals(depid, that.depid) && Objects.equals(title, that.title) && Objects.equals(jobTitle, that.jobTitle) && Objects.equals(jobId, that.jobId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(badge, name, email, depid, title, jobTitle, jobId);
    }

    @Override
    public String toString() {
        return "TAmEhrEmpEntity{" +
                "badge='" + badge + '\'' +
                ", name='" + name + '\'' +
                ", email='" + email + '\'' +
                ", depid=" + depid +
                ", title='" + title + '\'' +
                ", jobTitle='" + jobTitle + '\'' +
                ", jobId=" + jobId +
                ", parentDepartment=" + parentDepartment +
                '}';
    }
}
